package com.bwie.remote;

import com.bwie.common.domain.Menu;
import com.bwie.common.domain.User;
import com.bwie.common.result.Result;
import com.bwie.remote.factory.RemoteServiceFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @className: RemoteService
 * @Description: TODO
 * @version: v1.８.0
 * @author: GONGWENXUE
 * @date: 2025/10/22 9:29
 */
@FeignClient("bwie-system")
public interface RemoteService {
    /**
     * 用户名密码登录一会
     * @param username
     * @return
     */
    @GetMapping("sys/selectNameByUser/{username}")
    public Result<User> selectNameByUser(@PathVariable("username") String username);

    /**
     * 手机号密码登录
     * @param phone
     * @return
     */
    @GetMapping("sys/selectPhoneByUser/{phone}")
    public Result<User> selectPhoneByUser(@PathVariable("phone") String phone);
    /**
     * 菜单树
     */
    @GetMapping("getMenu/{userId}")
    public Result<List<Menu>> getMenu(@PathVariable("userId") Integer userId);
}
